import http from './http.js'

//域名
export const baseurl = http.getBaseUrl()

// 小程序相关信息
export const appSettingFunc = p => http.get('/public/getSetting', p)

// 公共文件上传
export const uploadFileFunc = p => http.uploadFile('/common/upload', p)

// 登录
export const authLoginFunc = p => http.get('/api/account/login', p)

// 根据code获取手机号
export const authPhoneFunc = p => http.get('/api/account/getPhone', p)

// 登录之前修改用户信息
export const noLoginUpdateFunc = p => http.post('/api/account/register', p)

// 首页轮播
export const bannerFunc = p => http.get('/public/listIndexImg', p)

// 公告
export const noticeListFunc = p => http.get('/api/inform/page', p)

// 待领取优惠券
export const couponListFunc = p => http.get('/api/accountCoupon/unget', p)

// 领取优惠券
export const couponSaveFunc = p => http.post('/api/accountCoupon/save', p)

// 商品列表
export const goodsListFunc = p => http.get('/public/pageProduct', p)

// 商品详情
export const goodsDetailFunc = p => http.get('/public/productDetails', p)

// 小区列表
export const communityListFunc = p => http.get('/public/listEstate', p)

// 分类
export const cateFunc = p => http.get('/public/listClassify', p)

// 意见反馈
export const feedbackFunc = p => http.post('/api/opinion/save', p)

// 意见反馈记录
export const feedbackRecordFunc = p => http.get('/api/opinion/page', p)

// 用户信息
export const userinfoFunc = p => http.get('/api/account/info', p)

// 加入购物车
export const cartAddFunc = p => http.post('/api/shopping/saveOrUpdate', p)

// 购物车列表
export const cartListFunc = p => http.get('/api/shopping/list', p)

// 购物车总价
export const cartAmountFunc = p => http.get('/api/shopping/getSum', p)

// 购物车删除
export const cartDelFunc = p => http.get('/api/shopping/del', p)

// 地址列表
export const addressListFunc = p => http.get('/api/accountAddress/page', p)

// 地址详情
export const addressDetailFunc = p => http.get('/api/accountAddress/info', p)

// 添加地址
export const addressAddFunc = p => http.post('/api/accountAddress/save', p)

// 修改地址
export const addressUpdateFunc = p => http.post('/api/accountAddress/update', p)

// 楼栋列表
export const buildingListFunc = p => http.get('/public/listBuilding', p)

// 下单
export const confirmOrderFunc = p => http.post('/api/orders/save', p)

// 下单页商品
export const confirmInfoFunc = p => http.post('/api/orders/getProduct', p)

// 下单页计算价格
export const confirmPriceFunc = p => http.post('/api/orders/assess', p)

// 我的优惠券
export const myCouponFunc = p => http.get('/api/accountCoupon/page', p)

// 订单列表
export const orderListFunc = p => http.get('/api/orders/page', p)

// 订单详情
export const orderInfoFunc = p => http.get('/api/orders/info', p)

// 获取会员支付设置
export const vipSettingFunc = p => http.get('/public/listVipSetting', p)

// 微信小程序支付
export const miniAppPayFunc = p => http.get('/wxPay/miniAppPay', p)

// 账户明细
export const balanceHistoryFunc = p => http.get('/api/balanceHistory/page', p)

// 提现
export const withdrawFunc = p => http.post('/api/withdraw/save', p)

// 提现记录
export const withdrawListFunc = p => http.get('/api/withdraw/page', p)

// 提现中金额
export const withdrawSumFunc = p => http.get('/api/withdraw/sum', p)

// 获取设置详细信息
export const getSettingFunc = p => http.get('/public/getSetting', p)

// 取消订单
export const orderUpdateFunc = p => http.post('/api/orders/update', p)

// 评价商品
export const orderCommentFunc = p => http.post('/api/evaluate/save', p)

// 收藏
export const collectSaveFunc = p => http.post('/api/collect/save', p)

// 取消收藏
export const collectDelFunc = p => http.get('/api/collect/del', p)

// 是否收藏
export const collectHaveFunc = p => http.get('/api/collect/have', p)

// 我的收藏
export const collectListFunc = p => http.get('/api/collect/page', p)

// 商品的评价
export const goodsCommentFunc = p => http.get('/public/pageComment', p)

// 获取某个配送员
export const oneCourierFunc = p => http.get('/public/getCourier', p)

// 修改用户信息
export const userUpdateFunc = p => http.post('/api/account/update', p)

// 热门搜索
export const hotSearchFunc = p => http.get('/public/getHotSearch', p)

// 物品类型
export const listTypeFunc = p => http.get('/public/listType', p)

// 是否有未读消息
export const informUnreadFunc = p => http.get('/api/inform/unread', p)

// 购物车数量
export const shoppingCountFunc = p => http.get('/api/shopping/getCount', p)

// 领取会员
export const getVipFunc = p => http.get('/api/account/getVip', p)

// 充值模板
export const paySettingFunc = p => http.get('/public/paySetting', p)
//时间列表
export const timeListContent = p => http.get('/public/listTimeSetting', p)